<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      const aa = null

      console.log(aa && aa.bb)
      // console.log(aa?.bb)
      // aa?.fn()

      const button = document.querySelector('button')

      button?.addEventListener('click', () => {
        console.log('点击了button')
      })
    </script>
  </body>
</html>
